package com.tanhua.server.service;


import com.tanhua.dubbo.api.mongo.UserLocationApi;
import com.tanhua.server.interceptor.UserHolder;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service
public class BaiduService {

    @Reference
    private UserLocationApi userLocationApi;

    /**
     *  保存地理位置
     */
    public ResponseEntity saveLocation(Double latiude, Double longitude, String address) {
        userLocationApi.save(latiude,longitude,address, UserHolder.getUserId());
        return ResponseEntity.ok(null);
    }
}
